home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Education / T-Z / trigHype.cpt / trigHype™ / card_6844.txt < prev    next >
Encoding:
Text File  |  1990-08-12  |  4.0 KB  |  205 lines

  1. -- card: 6844 from stack: in
  2. -- bmap block id: 7137
  3. -- flags: 4000
  4. -- background id: 4114
  5. -- name: A,c known
  6. ----- HyperTalk script -----
  7. on mouseUp
  8.   set numberFormat to <0.000000>
  9.  
  10.   --Calculate Angle B
  11.   get bkgnd field "Angle C"
  12.   put it into mem1
  13.   get card field "Angle A"
  14.   put it into mem2
  15.   get mem1-mem2
  16.   put it into card field "Angle B"
  17.  
  18.   --Calculate Tan A
  19.   get tan(mem2*(pi/180))
  20.   put it into mem3
  21.   put it into card field "tan A"
  22.  
  23.   --Calculate Sin A
  24.   get sin(mem2*(pi/180))
  25.   put it into mem4
  26.   put it into card field "sin A"
  27.  
  28.   --Calculate Cos A
  29.   get mem4/mem3
  30.   put it into mem5
  31.   put it into card field "cos A"
  32.  
  33.   --Calculate Side a
  34.   get card field "side c"*mem4
  35.   put it into card field "side a"
  36.  
  37.   --Calculate Side b
  38.   get card field "side c"*mem5
  39.   put it into card field "side b"
  40.  
  41.   --Calculate Area
  42.   get card field "side a"*card field "side b"/2
  43.   put it into bkgnd field "Area"
  44.  
  45.   --Calculate Perimeter
  46.   get card field "side a"+card field "side b"+card field "side c"
  47.   put it into bkgnd field "Perimeter"
  48. end mouseUp
  49.  
  50.  
  51. -- part 1 (field)
  52. -- low flags: 00
  53. -- high flags: 0002
  54. -- rect: left=22 top=217 right=234 bottom=150
  55. -- title width / last selected line: 0
  56. -- icon id / first selected line: 0 / 0
  57. -- text alignment: 1
  58. -- font id: 3
  59. -- text size: 12
  60. -- style flags: 0
  61. -- line height: 16
  62. -- part name: angle A
  63.  
  64.  
  65. -- part 2 (field)
  66. -- low flags: 00
  67. -- high flags: 0002
  68. -- rect: left=51 top=137 right=154 bottom=184
  69. -- title width / last selected line: 0
  70. -- icon id / first selected line: 0 / 0
  71. -- text alignment: 1
  72. -- font id: 3
  73. -- text size: 12
  74. -- style flags: 0
  75. -- line height: 16
  76. -- part name: side c
  77.  
  78.  
  79. -- part 3 (field)
  80. -- low flags: 01
  81. -- high flags: 0004
  82. -- rect: left=245 top=85 right=104 bottom=373
  83. -- title width / last selected line: 0
  84. -- icon id / first selected line: 0 / 0
  85. -- text alignment: 1
  86. -- font id: 3
  87. -- text size: 12
  88. -- style flags: 256
  89. -- line height: 16
  90. -- part name: angle B
  91.  
  92.  
  93. -- part 4 (field)
  94. -- low flags: 01
  95. -- high flags: 0004
  96. -- rect: left=347 top=144 right=163 bottom=475
  97. -- title width / last selected line: 0
  98. -- icon id / first selected line: 0 / 0
  99. -- text alignment: 1
  100. -- font id: 3
  101. -- text size: 12
  102. -- style flags: 256
  103. -- line height: 16
  104. -- part name: side a
  105.  
  106.  
  107. -- part 5 (field)
  108. -- low flags: 01
  109. -- high flags: 0004
  110. -- rect: left=112 top=263 right=282 bottom=240
  111. -- title width / last selected line: 0
  112. -- icon id / first selected line: 0 / 0
  113. -- text alignment: 1
  114. -- font id: 3
  115. -- text size: 12
  116. -- style flags: 256
  117. -- line height: 16
  118. -- part name: side b
  119.  
  120.  
  121. -- part 6 (field)
  122. -- low flags: 01
  123. -- high flags: 0001
  124. -- rect: left=387 top=208 right=220 bottom=447
  125. -- title width / last selected line: 0
  126. -- icon id / first selected line: 0 / 0
  127. -- text alignment: 0
  128. -- font id: 3
  129. -- text size: 9
  130. -- style flags: 0
  131. -- line height: 12
  132. -- part name: tan A
  133.  
  134.  
  135. -- part 7 (field)
  136. -- low flags: 01
  137. -- high flags: 0001
  138. -- rect: left=387 top=224 right=236 bottom=447
  139. -- title width / last selected line: 0
  140. -- icon id / first selected line: 0 / 0
  141. -- text alignment: 0
  142. -- font id: 3
  143. -- text size: 9
  144. -- style flags: 0
  145. -- line height: 12
  146. -- part name: sin A
  147.  
  148.  
  149. -- part 8 (field)
  150. -- low flags: 01
  151. -- high flags: 0001
  152. -- rect: left=387 top=240 right=252 bottom=447
  153. -- title width / last selected line: 0
  154. -- icon id / first selected line: 0 / 0
  155. -- text alignment: 0
  156. -- font id: 3
  157. -- text size: 9
  158. -- style flags: 0
  159. -- line height: 12
  160. -- part name: cos A
  161.  
  162.  
  163. -- part contents for card part 2
  164. ----- text -----
  165. 1.414214
  166.  
  167. -- part contents for card part 1
  168. ----- text -----
  169. 45
  170.  
  171. -- part contents for background part 3
  172. ----- text -----
  173. 90
  174.  
  175. -- part contents for card part 3
  176. ----- text -----
  177. 45.000000
  178.  
  179. -- part contents for card part 6
  180. ----- text -----
  181. 1.000000
  182.  
  183. -- part contents for card part 7
  184. ----- text -----
  185. 0.707107
  186.  
  187. -- part contents for card part 8
  188. ----- text -----
  189. 0.707107
  190.  
  191. -- part contents for card part 4
  192. ----- text -----
  193. 1.000000
  194.  
  195. -- part contents for card part 5
  196. ----- text -----
  197. 1.000000
  198.  
  199. -- part contents for background part 5
  200. ----- text -----
  201. 0.500000
  202.  
  203. -- part contents for background part 9
  204. ----- text -----
  205. 3.414214